package com.scs.application.enums;

import lombok.Getter;

/**
 * @description: 资质业务类型
 */
@Getter
public enum CertBusType {
    SUPPLIER("10","企业资质"),
    MATERIAL("20","品名资质"),
    CATALOG("21","品类资质"),
    MANUFACTURER("30","厂商资质");

    private String value;

    private String name;

    CertBusType(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public static CertBusType of(String value) {
        switch (value){
            case "10":
                return CertBusType.SUPPLIER;
            case "20":
                return CertBusType.MATERIAL;
            case "21":
                return CertBusType.CATALOG;
            case "30":
                return CertBusType.MANUFACTURER;
            default:
                return CertBusType.SUPPLIER;
        }
    }


}
